package com.wofish.member.service.impl;

import com.wofish.common.core.text.Convert;
import com.wofish.member.domain.MemberPoint;
import com.wofish.member.mapper.MemberPointMapper;
import com.wofish.member.service.IMemberPointService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 会员积分明细 服务层实现
 * 
 * @author wofish
 * @date 2019-05-21
 */
@Service
public class MemberPointServiceImpl implements IMemberPointService {
	@Autowired
	private MemberPointMapper memberPointMapper;

	/**
	 * 查询会员积分明细信息
	 *
	 * @param id 会员积分明细ID
	 * @return 会员积分明细信息
	 */
	@Override
	public MemberPoint selectMemberPointById(Long id) {
		return memberPointMapper.selectMemberPointById(id);
	}

	/**
	 * 查询会员积分明细列表
	 *
	 * @param memberPoint 会员积分明细信息
	 * @return 会员积分明细集合
	 */
	@Override
	public List<MemberPoint> selectMemberPointList(MemberPoint memberPoint) {
		return memberPointMapper.selectMemberPointList(memberPoint);
	}

	/**
	 * 新增会员积分明细
	 *
	 * @param memberPoint 会员积分明细信息
	 * @return 结果
	 */
	@Override
	public int insertMemberPoint(MemberPoint memberPoint) {
		return memberPointMapper.insertMemberPoint(memberPoint);
	}

	/**
	 * 修改会员积分明细
	 *
	 * @param memberPoint 会员积分明细信息
	 * @return 结果
	 */
	@Override
	public int updateMemberPoint(MemberPoint memberPoint) {
		return memberPointMapper.updateMemberPoint(memberPoint);
	}

	/**
	 * 删除会员积分明细对象
	 *
	 * @param ids 需要删除的数据ID
	 * @return 结果
	 */
	@Override
	public int deleteMemberPointByIds(String ids) {
		return memberPointMapper.deleteMemberPointByIds(Convert.toStrArray(ids));
	}

}
